################################################################################
# Find all files with <>
################################################################################


use strict;
use File::Find;



#All files will be stored in subfolders in this directory.
my $baseDirectory = "D:/Kiva/";
#my $baseDirectory = "C:/Documents and Settings/hellerja/Desktop/temp/Kiva/";

my $loanDirectory = $baseDirectory."data/loans/";

 
#Find all files that end with xml
my @directories;
@directories = ($loanDirectory);
find(\&parseLoan, @directories);
 


################################################################################
sub parseLoan
{
  my $fileName = $_;

  #Process any files that end in .xml
  if (lc($fileName) =~ /.*\.xml$/)
  {
    open FILE, "<", $fileName or die $!;
    
    while (my $line = <FILE>)
    {
      if ($line =~ m/<>/)
      {
        print $fileName."\n";
      }
    }
  }
}
